package container.set;

import java.util.Set;
import java.util.TreeSet;

public class TestTreeSet
{
    public static void main (String[] args)
    {
        Set<User> treeSet1 = new TreeSet<>();
        
        User user1 = new User(18, "oldlu");
        User user2 = new User(21, "chen");
        User user = new User(22, "admin");
        
        treeSet1.add(user1);
        treeSet1.add(user2);
        treeSet1.add(user);
    
        for(User temp : treeSet1)
        {
            System.out.println(temp);
        }
        
    }
}
